Skip to content

Improved dev scripting for docs authoring - #765

Draft
timothyb89 wants to merge 1 commit into
mainfrom
timothyb89/devtools
Draft

Improved dev scripting for docs authoring#765
timothyb89 wants to merge 1 commit into
mainfrom
timothyb89/devtools

Conversation

@timothyb89

@timothyb89 timothyb89 commented Jul 23, 2026

Copy link
Copy Markdown

This is an improved yarn dev-style helper that:

  • Reliably handles file changes without crashing when includes change
  • Doesn't leave docasaurus processes running on close
  • Selectively includes only specified versions (latest by default) to greatly reduce memory use.

While working on docs, I found that edit to an include file would put the existing yarn dev script into a restart loop, forcing it to copy files again from scratch, restart docasaurus on a new port due to a conflict, pop a new browser tab, and usually get stuck in a failed state. It also usually left zombie processes running.

I asked Claude to take a look at existing tooling to see if the bash

  • rsync situation could be merged into a proper tool, and this is what it came up with. It manages the docasaurus processes properly, and solves the include problem by maintaining its own include dependency graph and triggering specific copy/rerender operations without having to restart docasaurus.

Then, since I'm perpetually running out of memory on my MacBook, I also had it find some nonintrusive ways to reduce memory use from the default ~6 GiB. This (by default) disables sourcemaps and some debug features that aren't helpful when working on just Markdown, and only renders the latest version. These tweaks brought memory use down to ~2.6GiB on my machine.

As a note, this is totally vibe coded and should probably not be merged as-is, so I'm leaving it as a draft. Still, it's proven to be pretty robust for me so far and has been a nice improvement, so I figured it might be worth sharing. It doesn't modify the existing docs-website code at all and is safe to copy into your local clone without touching any real code. If desired, you can set up a local ignore in .git/info/exclude so it stays out of future commits.

This is an improved `yarn dev`-style helper that:
- Reliably handles file changes without crashing when includes
  change
- Doesn't leave `docasaurus` processes running on close
- Selectively includes only specified versions (latest by default)
  to greatly reduce memory use.

While working on docs, I found that edit to an include file would
put the existing `yarn dev` script into a restart loop, forcing it to
copy files again from scratch, restart `docasaurus` on a new port due
to a conflict, pop a new browser tab, and usually get stuck in a
failed state. It also usually left zombie processes running.

I asked Claude to take a look at existing tooling to see if the bash
+ rsync situation could be merged into a proper tool, and this is
what it came up with. It manages the `docasaurus` processes properly,
and solves the include problem by maintaining its own include
dependency graph and triggering specific copy/rerender operations
without having to restart `docasaurus`.

Then, since I'm perpetually running out of memory on my MacBook, I
also had it find some nonintrusive ways to reduce memory use from the
default ~6 GiB. This (by default) disables sourcemaps and some debug
features that aren't helpful when working on just Markdown, and only
renders the latest version. These tweaks brought memory use down to
~2.6GiB on my machine.

As a note, this is totally vibe coded and should probably not be
merged as-is. Still, it's proven to be pretty robust for me so far
and has been a nice improvement, so I figured it might be worth
sharing.
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

Amplify deployment status

Branch Commit Job ID Status Preview Updated (UTC)
timothyb89/devtools 07ea3dc 1 ✅SUCCEED timothyb89-devtools 2026-07-24 00:02:37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant